
<div class="container">
<?php
if (empty($datalist)) {
	echo "<h3>Data masih kosong!</h3>";
}
else {
?>
			<table id="my_data_list" class="table table-striped table-bordered" cellspacing="0" width="100%">
				<thead>
					<tr>
						<th>No</th>
						<th>Temuan</th>
						<th>NIK Anggota</th>
						<th>Aksi</th>
					</tr>
				</thead>
				<tbody>
				<?php
				$no = 1;
				foreach ($datalist as $data):
				?>
					<tr>
						<td valign="top"><div><?php echo $no; ?></div></td>
						<td>
							<div>
							<?php if($data->S1) { ?><div style="margin:0px 0px 15px 0px;"><?php echo $data->S1; ?></div><?php } ?>
							<?php if($data->S2) { ?><div style="margin:0px 0px 15px 0px;"><?php echo $data->S2; ?></div><?php } ?>
							<?php if($data->S3) { ?><div style="margin:0px 0px 15px 0px;"><?php echo $data->S3; ?></div><?php } ?>
							<?php if($data->S4) { ?><div style="margin:0px 0px 15px 0px;"><?php echo $data->S4; ?></div><?php } ?>
							<?php if($data->S5) { ?><div style="margin:0px 0px 15px 0px;"><?php echo $data->S5; ?></div><?php } ?>
							
							<?php if($data->K1) { ?><div style="margin:0px 0px 15px 0px;"><?php echo $data->K1; ?></div><?php } ?>
							<?php if($data->K2) { ?><div style="margin:0px 0px 15px 0px;"><?php echo $data->K2; ?></div><?php } ?>
							<?php if($data->K3) { ?><div style="margin:0px 0px 15px 0px;"><?php echo $data->K3; ?></div><?php } ?>
							<?php if($data->K4) { ?><div style="margin:0px 0px 15px 0px;"><?php echo $data->K4; ?></div><?php } ?>
							<?php if($data->K5) { ?><div style="margin:0px 0px 15px 0px;"><?php echo $data->K5; ?></div><?php } ?>
							
							<?php if($data->G1) { ?><div style="margin:0px 0px 15px 0px;"><?php echo $data->G1; ?></div><?php } ?>
							<?php if($data->G2) { ?><div style="margin:0px 0px 15px 0px;"><?php echo $data->G2; ?></div><?php } ?>
							<?php if($data->G3) { ?><div style="margin:0px 0px 15px 0px;"><?php echo $data->G3; ?></div><?php } ?>
							<?php if($data->G4) { ?><div style="margin:0px 0px 15px 0px;"><?php echo $data->G4; ?></div><?php } ?>
							<?php if($data->G5) { ?><div style="margin:0px 0px 15px 0px;"><?php echo $data->G5; ?></div><?php } ?>
							</div>
						</td>
						<td valign="top"><?php echo $data->ANGGOTA." ".$data->ANGGOTA2; ?></td>
						<td valign="top">
						<?php
						if($this->session->userdata('role')==5)
						{
						?>
						<a href="<?php echo base_url();?>index.php/haspem/ubah/<?php echo $data->ID_LAPORAN; ?>">Ubah</a> | <a href="<?php echo base_url();?>index.php/haspem/hapus/<?php echo $data->ID_LAPORAN; ?>">Hapus</a>  | <a href="<?php echo base_url();?>index.php/haspem/detail/<?php echo $data->ID_LAPORAN; ?>">Detail</a>
						<?php
						}
						else if($this->session->userdata('role')==1)
						{
						?>
						<a href="<?php echo base_url();?>index.php/haspem/ubah/<?php echo $data->ID_LAPORAN; ?>">Ubah</a> | <a href="<?php echo base_url();?>index.php/haspem/hapus/<?php echo $data->ID_LAPORAN; ?>">Hapus</a>  | <a href="<?php echo base_url();?>index.php/haspem/detail/<?php echo $data->ID_LAPORAN; ?>">Detail</a>
						<?php
						}
						else if($this->session->userdata('role')==2)
						{
						?>
						<a href="<?php echo base_url();?>index.php/haspem/ubah/<?php echo $data->ID_LAPORAN; ?>">Ubah</a> | <a href="<?php echo base_url();?>index.php/haspem/detail/<?php echo $data->ID_LAPORAN; ?>">Detail</a>
						<?php
						}
						else if($this->session->userdata('role')==3 || $data->PENGAWAS==1)
						{
						?>
						<a href="<?php echo base_url();?>index.php/haspem/ubah/<?php echo $data->ID_LAPORAN; ?>">Ubah</a> | <a href="<?php echo base_url();?>index.php/haspem/detail/<?php echo $data->ID_LAPORAN; ?>">Detail</a>
						<?php
						}
						else if($this->session->userdata('role')==3 || $data->PENGAWAS!=1)
						{
						?>
						<a href="<?php echo base_url();?>index.php/haspem/detail/<?php echo $data->ID_LAPORAN; ?>">Detail</a>
						<?php
						}
						else if($this->session->userdata('role')==4)
						{
						?>
						<a href="<?php echo base_url();?>index.php/haspem/detail/<?php echo $data->ID_LAPORAN; ?>">Detail</a>
						<?php
						}
						?>
						</td>
					</tr>
				<?php
				$no++;
				endforeach;
				?>
				</tbody>
			</table>
<?php
}
?>
		</div>
		</body></html>